<?php
namespace Mobile\Controller;
use Think\Controller;
/**
 * 首页控制器
 */
class IndexController extends CommonController {
	
	//首页视图显示
    public function index(){
    	//推荐文章
    	$where = array('type'=>1,'del'=>0);
    	$field = array('id','title');
    	$this->mylist = M('blog')->where($where)->field($field)->order('time DESC')->limit(5)->select();

    	//最新文章
    	$this->newlist = M('blog')->where(array('del'=>0))->field($field)->order('time DESC')->limit(5)->select();
    	$this->display();;
    }
}